package com.csk.zsk.compents.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.csk.zsk.compents.dao.WeatherCodeDao;
import com.csk.zsk.compents.entity.WeatherCode;
import com.csk.zsk.compents.service.WeatherCodeService;
@Service
@Transactional
public class WeatherCodeServiceImpl implements WeatherCodeService {
	@Autowired
	private WeatherCodeDao weatherCodeDao;
	@Override
	@Transactional(readOnly = true)
	public WeatherCode getWeatherCodeById(String id) {
		return weatherCodeDao.getIdByGetMethod(id);
		
	}

	@Override
	@Transactional(readOnly = true)
	public List<WeatherCode> getWeatherCodeListByLevel(String level) {
		return weatherCodeDao.getWeatherCodeListByLevel(level);
	}

	@Override
	@Transactional(readOnly = true)
	public List<WeatherCode> getSubWeatherCodeList(String code) {
		return weatherCodeDao.getSubWeatherCodeList(code);
	}

	@Override
	@Transactional(readOnly = true)
	public WeatherCode getWeatherCodeByName(String cityname, String level) {
		return weatherCodeDao.getWeatherCodeByName(cityname, level);
	}

}
